﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace POVRay {
    public class LightSourcePhotons {
        public bool? Refraction { get; set; }
        public bool? Reflection { get; set; }
        public bool AreaLight { get; set; }

        public LightSourcePhotons() {
        }

        public LightSourcePhotons(bool? refraction, bool? reflection, bool areaLight) {
            Refraction = refraction;
            Reflection = reflection;
            AreaLight = areaLight;
        }

        public String ToString(int level) {
            StringBuilder sb = new StringBuilder();
            sb.Append("photons { ");

            if (Refraction.HasValue) {
                sb.Append(Scene.Indentation(level + 1) + "refraction " + Refraction.Value.POVRayString() + " ");
            }
            if (Reflection.HasValue) {
                sb.Append(Scene.Indentation(level + 1) + "reflection " + Reflection.Value.POVRayString() + " ");
            }
            if (AreaLight) {
                sb.Append(Scene.Indentation(level + 1) + "area_light ");
            }

            sb.Append(Scene.Indentation(level) + "}");
            return sb.ToString();
        }
    }
}
